﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Sector7.Framework.Core;

namespace Sector7.Framework.Windows
{
    /// <summary>
    /// ProgressWindow.xaml 的交互逻辑
    /// </summary>
    public partial class ProgressWindow : Window
    {
        #region Accessor
        /// <summary>
        /// 获取或设置窗口可见性
        /// </summary>
        public new Visibility Visibility
        {
            get { return base.Visibility; }
            set
            {
                if (Senvironments.MainWindow != null)
                {
                    switch (value)
                    {
                        case Visibility.Hidden:
                            Senvironments.MainWindow.IsEnabled = true;
                            break;
                        case Visibility.Visible:
                            Senvironments.MainWindow.IsEnabled = false;
                            break;
                    }

                    base.Visibility = value;
                }
            }
        }
        #endregion

        #region Public functions
        /// <summary>
        /// 显示窗口。该方法已被屏蔽，调用后触发InvalidOperationException异常。
        /// </summary>
        public new void Show()
        {
            throw new InvalidOperationException();
        }

        /// <summary>
        /// 显示模态窗口。该方法已被屏蔽，调用后触发InvalidOperationException异常。
        /// </summary>
        public new void ShowDialog()
        {
            throw new InvalidOperationException();
        }

        /// <summary>
        /// 关闭窗口。该方法已被屏蔽，调用后触发InvalidOperationException异常。
        /// </summary>
        public new void Close()
        {
            throw new InvalidOperationException();
        }
        #endregion

        #region Private functions
        #endregion

        #region Structure
        /// <summary>
        /// 创建进度加载窗口
        /// </summary>
        public ProgressWindow()
        {
            InitializeComponent();
        }
        #endregion

        #region Inner members
        #endregion
    }
}
